using GLib;
using Gtk;


public class GUIMain : Gtk.Window
{
	private Gtk.VBox vbox;
	private Gtk.HBox hbox;
	private Gtk.Button new_button;
	private Gtk.Button delete_button;
	private Gtk.Button edit_button;
	private Gtk.TreeView items;
	
	construct
	{
		this.title = "Configure Rob";
		this.create_widgets();
	}
	public void create_widgets()
	{

		
		this.destroy += Gtk.main_quit;
		
		GLib.Type[] cols = new GLib.Type[2];
		cols[0] = typeof(string);
		cols[1] = typeof(bool);
		this.items = new Gtk.TreeView( );		
		stdout.printf("List created\n");

	
		this.vbox = new Gtk.VBox(true, 10);
		this.hbox = new Gtk.HBox(true, 10);
		this.new_button = new Gtk.Button.from_stock(Gtk.STOCK_NEW);
		this.delete_button = new Gtk.Button.from_stock(Gtk.STOCK_DELETE);
		this.edit_button = new Gtk.Button.from_stock(Gtk.STOCK_EDIT);

		this.add(this.vbox);

		this.vbox.add(this.items);
		this.vbox.add(this.hbox);
		this.hbox.add(this.new_button);
		this.hbox.add(this.edit_button);
		this.hbox.add(this.delete_button);
		

		Gtk.TreeViewColumn col = new Gtk.TreeViewColumn.with_attributes("Title", new Gtk.CellRendererText());
		col.pack_start( new Gtk.CellRendererText(), true);
		//col.add_attribute( 
		this.items.append_column(col);
/*		for( int i = 0; i <20 ; i ++)
		{

			col = new Gtk.TreeViewColumn.with_attributes("this is a test", new Gtk.CellRendererText() );
			this.items.append_column(col);

					
		}*/
	}

	static int main(string[] args)
	{
		Gtk.init( ref args );
		var gui = new GUIMain();
		gui.show_all();

		Gtk.main();
		return 0;
	}
}
